package cn.lzwei.common.valid;

import javax.validation.Constraint;
import javax.validation.Payload;
import javax.validation.constraints.NotNull;
import java.lang.annotation.Documented;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.ElementType.TYPE_USE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

@Constraint(validatedBy = {StatusConstraintValidatorForInteger.class }) //校验器
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE })
@Retention(RUNTIME)
@Documented
public @interface ListValue {
    String message() default "{cn.lzwei.common.valid.ListValue.message}"; //默认在配置文件中获取消息

    Class<?>[] groups() default { };

    Class<? extends Payload>[] payload() default { };

    int[] value() default { }; //可接受的值
}
